home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / comm / news / DWdecode.lha / dwdecode1.02 / DWdecode.Doc < prev    next >
Text File  |  1997-04-01  |  53KB  |  918 lines

  1. Document DWDecode v1.02 Documentation
  2. @$VER: DWDecode v1.02 Copyright ©1996-97 by Dick Whiting
  3.  
  4.                            DWDecode v1.02 Documentation
  5.  
  6.                       Copyright ©1996-1997 by Dick Whiting                      
  7.                                                                                 
  8.                                                                                 
  9.   Standard Disclaimer: I wrote it, it works for me, I don't guarantee           
  10.   that it will do anything productive for anyone else, etc. etc. ;-)            
  11.                                                                                 
  12.   HOWEVER, if you do find a use for it: I homeschool my kids and they would     
  13.   love a postcard from where EVER you live. Instant Geography Lesson;)          
  14.                                                                                 
  15.   Postcards:    Dick Whiting                                                    
  16.                 28590 S. Beavercreek Rd.                                        
  17.                 Mulino, Oregon 97042                                            
  18.                 USA                                                             
  19.                                                                                 
  20.   Email:        Dick Whiting <dwhiting@europa.com>                                                                                 
  21.                                                                                 
  22.                                                                                 
  23.  
  24. 1. Requirements  
  25. ---------------
  26.  
  27. You will need several programs/libraries from Aminet:
  28.  
  29.    RexxArpLib by Willy Langeveld  - util/rexx/ral3p3.lha
  30.  
  31.    FlashFind  by Frank Würkner    - util/cli/FlashFind1.2.lha
  32.  
  33.    A UUdecoder
  34.      e.g. UUout by Nicolas Dade   - util/arc/uuOut114.lha
  35.      
  36.    A Base64 decoder 
  37.      e.g. Base64coders by Edmund Vermeulen - comm/mail/Base64coders.lha
  38.  
  39.    A BinHex decoder 
  40.      e.g. binhex374 by Nik Soggia - util/arc/binhex374.lha
  41.  
  42.    And, of course, some Use Net files with encoded binaries;)
  43.  
  44. FILES INCLUDED IN THIS ARCHIVE:
  45.  
  46.    DWdecode               - the REAL program.
  47.    DWdecode.Base64.Types  - means of identifying Base64 first lines
  48.    DWdecode.Binary.Types  - means of identifying filenames in subject
  49.    DWdecode.Doc           - text format of documentation
  50.    DWdecode.Encode.Types  - MIME encoding types
  51.    DWdecode.Guide         - Amiga guide documentation
  52.    DWdecode.Guide.info    - info file for guide
  53.    DWdecode.Prefs         - a starter preference file
  54.    DWdecode.Readme        - copy of the Aminet readme file
  55.    DWdecode.Section.Types - describes Section lines of UUencoded files
  56.    DWdecode.Skip.Froms    - allows for filtering based on From: lines
  57.    DWdecode.Skip.Subjects - allows for filtering based on Subject: lines 
  58.    Samples/....           - subdirectory with example script(s)
  59.  
  60.    arexxqsort.lha         - handles sorting of stem variables.
  61.        by Willy Langeveld - originally found on Aminet 
  62.  
  63.  
  64. 2. Basics  
  65. ---------
  66.  
  67. This program does MASS decoding of Use Net files. It decodes ALL binaries
  68. that it is able to recognize, which is most;) from the source directory
  69. and optionally from ALL subdirectories as well.
  70.  
  71.  
  72. 2.1. What It Handles
  73. --------------------
  74.  
  75. It uses information from MIME content lines, section lines, begin lines
  76. and (if it must) the subject line to determine what kind of encoding is
  77. used and which parts go together. It reports on files that have missing
  78. parts and on ones that it is unable to obtain complete information for.   
  79.  
  80. It handles either single directories or can handle COMPLETE directory trees.
  81.  
  82. It handles files with SINGLE & MULTIPLE UUencoded OR Base64 binaries 
  83. within them and Multipart UUencoded or Base64 files.
  84.  
  85. It handles files with APPLE/DOUBLE format. My logic uses the LAST file 
  86. of a given name within a SINGLE input file. This forces the APPLE portion
  87. to be considered a duplicate and not processed.
  88.  
  89. It allows you to filenote the decoded binaries with a variety of
  90. substitution values as well as literals. 
  91.  
  92. It is quite 'smart' and generally can figure out most files.
  93.  
  94. It is highly configurable and using external files can 'learn'.
  95.  
  96. It should work with almost ANY Base64 and UU decoder.
  97. See WARNING below about pathname removal.
  98.  
  99. It allows for filtering based on From: and/or Subject: lines.
  100.  
  101. It allows for deleting input files after decoding, deleting duplicates, 
  102. deleting input files based on From: &/or Subject: lines, deleting files
  103. that have ONLY text in them, and deleting files based on their age.    
  104.  
  105. Reporting can be tailored by setting/unsetting a variety of switches on the
  106. command line or in the prefs file.
  107.  
  108. Probably other things ... but this IS enough. 
  109.  
  110. WARNING!!:
  111.  
  112. I strip ALL pathing off of encoded filenames prior to envoking the Decoders. 
  113. I thought about making this an option, but decided not to. It would be TOO
  114. easy for someone to overlay one of your system files.
  115.  
  116. For Base64 (using Base64Decode) the stripped filename is created in DEST 
  117. directory. 
  118.  
  119. UUout uses WHATEVER it finds on the begin line and I can't override
  120. it. For UUdecoding, assuming you use UUout, specify USEBASENAME as an option.
  121. This will prevent an encoded file of S:Startup-Sequence (for example) 
  122. overlaying YOURS! I do not suggest using a decoder that does not have this
  123. option!
  124.  
  125.  
  126. 2.2. Limitations  
  127. ----------------
  128.  
  129.  1) If someone REALLY tries to mislead this program; he CAN. I do alot of 
  130.     matching logic to locate parts xx/yy and associate them with the correct
  131.     part 1/yy, but nothing is certain. 
  132.  
  133.     EXAMPLE OF HOW TO CONFUSE DWDECODE:
  134.  
  135.        1) Multipart file with part 1 subject totally different from others
  136.        2) Multipart file with wrong xx/yy information, or swapped xx/yy
  137.        3) BASE64 file that has bad numbers in the subject. SOME people 
  138.           use 1/2 to mean 'I sent TWO files and here is the FIRST one'. This
  139.           WILL show on the error report and you can hand edit the subject.
  140.        
  141.     Just as a minor point, these would be ALMOST impossible to figure out
  142.     using your brain instead of a program. You would have to ASSUME too many
  143.     things to even have a chance of being able to assemble the parts,
  144.     or you could just try all of the combinations until one worked;)
  145.  
  146.  2) Very few error conditions are returned from UUOUT or BASE64, so I am
  147.     able to catch very few. Generally I have found that even if I CAN detect
  148.     an error, there is really no way to fix it -- generally the input file
  149.     is corrupt. The only REAL exception is that UUOUT demands an 'end '
  150.     statement and you can go in and add one or fix the existing one (note
  151.     that 'end ' should have a blank after the 'd'). 
  152.  
  153.  3) It DOES NOT handle:
  154.  
  155.     a) Files that include both UUencoded AND Base64 encoded pieces within
  156.        the SAME file. (I have NEVER seen one, but you never know ...)
  157.  
  158.     b) MultiPart files that include portions of more than 1 encoded binary.
  159.        (I know that wasn't clear, but ...) For example: You encoded 3
  160.        pictures and spread them across 6 files with no 1 file containing a
  161.        complete piece. Again, I haven't seen this, but ... 
  162.        oops!, figures;), just received one!!
  163.     
  164.     c) It will probably have problems with joining files with dozens of
  165.        parts because of the length of the command that is constructed. 
  166.        This has never been a problem for me since I NEVER have gotten ALL
  167.        the necessary parts when I needed more than 4;) Actually, I SELDOM
  168.        end up with all 3 of a 3/3 file. 
  169.  
  170.     d) It does not handle multipart BinHex files. I can not tell that parts
  171.        xx/yy are in BinHex format rather than Base64. If YOU know how to 
  172.        tell by 'looking' that a file is in BinHex rather than Base64 please
  173.        email me. Thanks.
  174.  
  175.  
  176. 3. How To Get Started 
  177. ----------------------
  178.  
  179. Unload the archive to somewhere (make sure the 'S' protection bit is set for
  180. the program - DWdecode to make it easier to envoke)
  181.  
  182. Get any required programs from Aminet and install according to their
  183. documentation. If you put them ALL in the SAME directory as DWdecode, then
  184. you do not HAVE to modify the prefs file to get started.
  185.  
  186. Modify DWdecode.prefs to use YOUR decoding programs, etc.
  187.  
  188. See `Run time Options & Internal Defaults' for a complete description of 
  189. all the possible options, variables, etc. and how to specify them. 
  190. Also look at the included files so that you will know how to add to them 
  191. if necessary.
  192.  
  193. Run from a CLI or directory utility specifying a source directory and a
  194. destination directory.   
  195.  
  196. IF YOU INSTALL DIFFERENT PROGRAMS or LOCATE THEM ELSEWHERE:
  197.  
  198. Change these in YOUR prefs file as necessary (these are MY values):
  199.  
  200. Base64cmd='AmiTCP:bin/Base64Decode %sf %df USEMINLEN > nil:'
  201. B64cmdFail=20             #Return Code of 'DISK FULL' for Base64Decode
  202.  
  203. BinHexCmd='Utils:BHD data=%DF %SF'
  204. BinCmdFail=20             #Return Code of 'DISK FULL' for BHD
  205.  
  206. ScanProg='Utils:FlashFind'
  207.  
  208. UUcmd='AmiTCP:bin/UUout %sf BUFSIZE=150 IGNORETERMINATION USEBASENAME > nil:'
  209. UUcmdFail=10              #Return Code of 'DISK FULL' for UUOUT
  210.  
  211.  
  212. 4. Filenoting of Input Files
  213. ----------------------------
  214.  
  215. I filenote all of the files in the SOURCE= directory(s). The filenote is in
  216. the following format:
  217.  
  218. xyy SUBJET-LINE-FOUND-IN-THIS-FILE 
  219.     where  x='S' means the file was skipped due to a match on SKIPSUBJECT
  220.            x='F' means the file was skipped due to a match on SKIPFROM
  221.            x='O' means the file is older than the value for KEEPDAYS   
  222.            x=' ' for all others.
  223.  
  224.     where yy='  ' for text files
  225.           yy='UU' for UU encoded files
  226.           yy='64' for Base64 encoded files
  227.           yy='BH' for BinHex encoded files
  228.         
  229. This makes it fairly easy to check if files have been properly identified. I
  230. suggest using Dopus (or another), sorting the files by comment and examining
  231. them. This makes it easy to ensure that all 'text' files are really text. I
  232. look for high byte counts and then check them. Usually I find that someone
  233. has quoted the first 400 lines of an encoded file;) Doing this also makes it
  234. easy to look at the subject lines and see if parts were properly put
  235. together. 
  236.  
  237. Needless to say, if you specify some of the DELETExxxx options, there may 
  238. be nothing to examine;)
  239.  
  240.  
  241. 5. Run time Options & Internal Defaults                                                                               
  242. ---------------------------------------
  243.                                                                                 
  244.   Command line options override the prefs file and the prefs file options will  
  245.   override the internal defaults.                                               
  246.                                                                                 
  247.   All commands can be specified using the ALIAS or the fullname.                
  248.                                                                                 
  249.                                                                               
  250.   Commands have a 'TYPE' indicated.                                             
  251.       'B' is Boolean (YES/NO, TRUE/FALSE, ON/OFF, 1/0)                          
  252.       'N' is Numeric (any positive integer)                                     
  253.       'F' is a file. The program checks for its existence                       
  254.       'S' is a character string. Any alphanumeric string is accepted            
  255.                                                                                 
  256.                                                                                 
  257.   All options with a type of 'B' may be turned ON by specifying just the        
  258.   command or its alias.                                                         
  259.                                                                                 
  260. ------------------------------------------------------------------------------- 
  261.                                                                                 
  262.   FORMAT of documentation:  (options are grouped according to function)             
  263.                                                                                 
  264.  Command-Option  Alias  Type  Default-Value                                     
  265.                                                                                 
  266. ------------------------------------------------------------------------------- 
  267.                                                                                 
  268.   A complete alphabetical listing can be gotten by envoking DWDecode as:        
  269.                                                                                 
  270.     DWDecode -h  OR DWDecode ?  OR   DWDecode HELP                              
  271.                                                                                 
  272. ------------------------------------------------------------------------------- 
  273.  
  274.  
  275.                                                                                 
  276. 5.01. Decoders and their Failure Codes                           
  277. --------------------------------------
  278.                                                                                 
  279.  Base64Cmd   BC  F  Base64Decode %SF %DF USEMINLEN > nil:                       
  280.  B64cmdFail  BF  N  20                                                          
  281.                                                                                 
  282.  BinHexCmd   BHC F  Xbin -v %SF                                                 
  283.  BincmdFail  BHF N  0                                                           
  284.                                                                                 
  285.  UUcmd       UC  F  UUout %SF BUFSIZE=150 IGNORETERMINATION USEBASENAME > nil:  
  286.  UUcmdFail   UF  N  10                                                          
  287.                                                                                 
  288. ------------------------------------------------------------------------------- 
  289.  
  290.    These options control which decoders are used and what is considered a       
  291.    FATAL error such as 'Disk Full'. If you use different decoders you will      
  292.    have to construct your own command line string for them. They accept the     
  293.    following substitution variables:                                            
  294.                                                                                 
  295.    %SF is replaced with the complete name (including path) of the input file    
  296.    %DF is replaced with the complete name (including path) of the output file   
  297.    %SD is replaced with the name of the input directory                         
  298.    %DD is replaced with the name of the output directory                        
  299.                                                                                 
  300.    Likewise, you will HAVE to determine the appropriate xxxcmdFail value.       
  301.    The easiest way is just to direct decoding to a floppy disk and see what     
  302.    value is returned when the disk fills up and you select CANCEL on the        
  303.    requestor.                                                                   
  304.                                                                                 
  305.    I do a change directory to the output prior to envoking the decoders, so     
  306.    if yours does not require an output filename AND used the current directory  
  307.    you will not need to specify it.                                             
  308.                                                                                 
  309.                                                                                 
  310.    If you do NOT place them in the same directory as DWDecode, they you must    
  311.    specify the path information also. Such as:                                  
  312.                                                                                 
  313.    Base64Cmd='AmiTCP:bin/Base64Decode %SF %DF USEMINLEN > nil:'                 
  314.                                                                                 
  315.                                                                                 
  316.  
  317.                                                                                 
  318. 5.02. Files used for Determining Decoding Information                  
  319. -----------------------------------------------------
  320.                                                                                 
  321.  Base64TypesFile   B64F   F    DWdecode.Base64.Types                            
  322.  BinTypesFile      BTF    F    DWdecode.Binary.Types                            
  323.  EncTypesFile      ETF    F    DWdecode.Encode.Types                            
  324.  SectionTypesFile  STF    F    DWdecode.Section.Types                           
  325.                                                                                 
  326. ------------------------------------------------------------------------------- 
  327.  
  328.    These FILES contain information for determining how a file is encoded,       
  329.    where parts begin and end, and what words in a subject line MIGHT be a       
  330.    valid part name. See the individual file for further documentation. These    
  331.    files are required and are part of the DWDecode distribution.                
  332.                                                                                 
  333.                                                                                 
  334.  
  335.                                                                                 
  336. 5.03. Variables used for Determining Decoding Information              
  337. ---------------------------------------------------------
  338.                                                                                 
  339.  MaxHeader   MH  N  25                                                          
  340.  MinEncoded  ME  N   4                                                          
  341.                                                                                 
  342. ------------------------------------------------------------------------------- 
  343.  
  344.    After the output of the SCAN program has been checked, what are usually      
  345.    text files are searched looking for lines that might be UUencoded or B64     
  346.    encoded. Usually, any found will be part xx/yy of files.                     
  347.  
  348.    The MAXHEADER values says to only read nn lines looking for encoded lines.   
  349.  
  350.    The MINENCODED value says that there MUST be at least nn lines that seem     
  351.    to be the SAME kind of encoding and that no other lines may appear within    
  352.    this group of nn lines.  The default values seem to work well. If you see    
  353.    encoded files being indicated as text files, you can modify these values.    
  354.                                                                                 
  355.                                                                                 
  356.  
  357.                                                                                 
  358. 5.04. Files used for Setting Runtime Options                           
  359. --------------------------------------------
  360.                                                                                 
  361.  PrefsFile         P      F    DWdecode.Prefs                                   
  362.                                                                                 
  363. ------------------------------------------------------------------------------- 
  364.  
  365.    This file is used to set your personal preferences. You can have as many     
  366.    different preference files as you wish. Just specify:                        
  367.                                                                                 
  368.        DWDecode P='pref-file-this-time'                                         
  369.                                                                                 
  370.    to use a file with a different name. This is the VERY FIRST option that is   
  371.    checked from the command line and is used (if present) to load the current   
  372.    runs options.                                                                
  373.                                                                                 
  374.                                                                                 
  375.  
  376.                                                                                 
  377. 5.05. Directories and Input and Output                          
  378. --------------------------------------
  379.                                                                                 
  380.  Source            S      F    (NO default value)                               
  381.  Recursive         REC    B    YES                                              
  382.                                                                                 
  383.  Dest              D      F    (NO default value)                               
  384.  FileNote          FN     S    %LLQ2 : %SUBJECT                                 
  385.  Replace           REP    B    NO                                               
  386.                                                                                 
  387. ------------------------------------------------------------------------------- 
  388.  
  389.    SOURCE= and DEST= are used as the input for the USENET news files and as     
  390.    the output directory for decoded files. The RECURSIVE option controls        
  391.    whether SOURCE= is treated as a single directory or if it is considered      
  392.    as the highest level of a directory tree. RECURSIVE=YES will result in       
  393.    decoding ALL of the files in SOURCE=  plus ALL of the files in ALL of the    
  394.    subdirectories of SOURCE=                                                    
  395.                                                                                 
  396.    FILENOTE= controls the format of the filenote attached to decoded output     
  397.    files. Any character string is valid. However, substitution variables MUST   
  398.    be separated from other characters by at least 1 blank.                      
  399.                                                                                 
  400.    The string may contain the following substitution variables:                 
  401.                                                                                 
  402.    For the following examples assume input file is from directory:              
  403.        INTERNET:UUNEWS/alt/binaries/pictures/animals/cute/fuzzy                 
  404.                                                                                 
  405.    %LLQn is replaced by the last n levels of the INPUT directory name.          
  406.          if n is NOT specified the default is n=1                               
  407.                                                                                 
  408.          i.e. specifying FN='%LLQ2 : keep' would result in filenotes of         
  409.               'cute fuzzy : keep'                                               
  410.                                                                                 
  411.    %HLQn is replaced by the first n levels of the INPUT directory name.         
  412.          if n is NOT specified the default is the top level only (n=1)          
  413.                                                                                 
  414.          i.e. specifying FN='%HLQ2 : keep' would result in filenotes of         
  415.               'INTERNET UUNEWS : keep'                                          
  416.                                                                                 
  417.    %QUALxy is replaced with a portion of the INPUT directory name starting      
  418.            with the xth level for y levels. If xy are not specified then        
  419.            the COMPLETE directory name is used. If y is missing, then all       
  420.            levels starting with the xth are used.                               
  421.                                                                                 
  422.          i.e. specifying FN='%QUAL53 : keep' would result in                    
  423.               'pictures animals cute : keep'                                    
  424.                                                                                 
  425.    %DATE is replaced with the date from the Date: HEADER in the input file.     
  426.                                                                                 
  427.    %FROM is replaced with the value from the From: HEADER in the input file.    
  428.                                                                                 
  429.    %SUBJECT is replaced with the Subject: HEADER in the input file.             
  430.                                                                                 
  431.    %SOURCE is replaced with the FULL source directory name. If RECURSIVE=YES    
  432.            this will be the actual subdirectory name.                           
  433.                                                                                 
  434.    REPLACE=YES says to replace existing files in the output directory with      
  435.    new ones from the input directory. This may result in the same file being    
  436.    created multiple times each time overlaying the previously created one.      
  437.    With all of the cross posting that occurs, this can be a considerable        
  438.    nuisance. However, there ARE times that you may wish to turn this on.        
  439.                                                                                 
  440.                                                                                 
  441.  
  442.                                                                                 
  443. 5.06. Filtering of Input Files                                 
  444. ------------------------------
  445.                                                                                 
  446.  KeepDays          KD     N    30                                               
  447.  MarkOld           MO     B    YES                                              
  448.                                                                                 
  449.  SkipFrom          SF     B    YES                                              
  450.  SkipFromFile      SFF    F    DWdecode.Skip.Froms                              
  451.                                                                                 
  452.  SkipSubject       SS     B    YES                                              
  453.  SkipSubjectFile   SSF    F    DWdecode.Skip.Subjects                           
  454.                                                                                 
  455. ------------------------------------------------------------------------------- 
  456.                                                                                 
  457.    SKIPFROM=YES uses the values in the SKIPFROMFILE to bypass processing of     
  458.    certain input files. Files matching a SKIPFROMFILE value will have an 'F'    
  459.    in their filenote comment string. Use Dopus or another directory to check    
  460.    these.                                                                       
  461.                                                                                 
  462.    If DELETEFROM=YES then these files will be deleted PRIOR to any decoding.    
  463.                                                                                 
  464.    The SKIPSUBJECT=YES and SKIPSUBJECTFILE= options also work together in the   
  465.    same way. The input files that match will have an 'S' in their comment.      
  466.                                                                                 
  467.    These will disappear without ever being seen if DELETESUBJECT=YES.           
  468.                                                                                 
  469.    KEEPDAYS=nn specifies how many days (based on the Date: header) to keep an   
  470.    input file. If MARKOLD=YES then these files will go through the normal       
  471.    decoding logic and then have 'O' (old) placed in their filenote comments.    
  472.                                                                                 
  473.    If DELETEOLD=YES, then they will be deleted instead of being marked.         
  474.                                                                                 
  475.                                                                                 
  476.  
  477.                                                                                 
  478. 5.07. Report Control Options                               
  479. ----------------------------
  480.                                                                                 
  481.  ShowDecode        SHDE   B    YES                                              
  482.  ShowDirs          SHDI   B    YES                                              
  483.  ShowFiles         SHF    B    YES                                              
  484.  ShowParts         SHP    B    YES                                              
  485.  ShowStats         SHS    B    YES                                              
  486.                                                                                 
  487.  DumpOpts          DO     B    NO                                               
  488.                                                                                 
  489. ------------------------------------------------------------------------------- 
  490.                                                                                 
  491.   These options control which reports appear on the console or log (see LOG=)   
  492.                                                                                 
  493.   SHOWDIRS   switches on/off the complete list of ALL directories processed     
  494.   SHOWFILES  switches on/off the reporting by file                              
  495.   SHOWPARTS  switches on/off the reporting by partname                          
  496.   SHOWDECODE switches on/off the reporting of the decoding process              
  497.   SHOWSTATS  switches on/off the reporting of various stats for each directory  
  498.                                                                                 
  499.   DUMPOPTS   switches on/off the reporting of the runtime options               
  500.                                                                                 
  501.                                                                                 
  502.  
  503.                                                                                 
  504. 5.08. Delete Options                                    
  505. --------------------
  506.  
  507.   SUGGESTION: Don't turn these options on until you are REALLY secure with my   
  508.   program. Test SKIP options thoroughly BEFORE making them into DELETEs.        
  509.  
  510. ------------------------------------------------------------------------------- 
  511.                                                                                 
  512.  DeleteAfter       DELA   B    NO                                               
  513.  DeleteDups        DELD   B    NO                                               
  514.  DeleteFrom        DELF   B    NO                                               
  515.  DeleteOld         DELO   B    NO                                               
  516.  DeleteSubject     DELS   B    NO                                               
  517.  DeleteText        DELT   B    NO                                               
  518.  XDELETE           XD     B    NO                                               
  519.                                                                                 
  520. ------------------------------------------------------------------------------- 
  521.                                                                                 
  522.   These options control which (if any) input files are deleted after decoding   
  523.   and/or filtering.                                                             
  524.                                                                                 
  525.   DELETEAFTER=YES deletes all files used in a 'successful' decode.              
  526.   DELETEDUPS=YES  works in combination with REPLACE=                            
  527.                   If REPLACE=NO then DELETEDUPS will delete files that specify  
  528.                   an output file that ALREADY exists.                           
  529.                   If REPLACE=YES then DELETEDUPS will delete files that name    
  530.                   SAME output file as one decoded in the current run.           
  531.                                                                                 
  532.   DELETETEXT=YES  deletes any files that DWDecode 'thinks' are just text.       
  533.                                                                                 
  534.   DELETEFROM=YES  deletes any files identified during the SKIPFROM logic.       
  535.                                                                                 
  536.   DELETESUBJECT=YES deletes files identified by SKIPSUBJECT logic.              
  537.                                                                                 
  538.   DELETEOLD=YES  deletes any files identified as older than keepdays, but this  
  539.                  is done AFTER attempting to decode them.                       
  540.                                                                                 
  541.   XDELETE=YES  turns ON ALL DELETE options. Very dangerous, but it's there.     
  542.                                                                                 
  543.                                                                                 
  544.  
  545.                                                                                 
  546. 5.09. Debugging Options                                 
  547. -----------------------
  548.  
  549.   These are probably useless to most of you, but since I left them in, I        
  550.   thought I should document them--a very little;)                               
  551.  
  552. ------------------------------------------------------------------------------- 
  553.                                                                                 
  554.  Debug             DB     B    NO                                               
  555.  DumpBase64Types   D64T   B    NO                                               
  556.  DumpBinTypes      DBT    B    NO                                               
  557.  DumpDates         DD     B    NO                                               
  558.  DumpEncTypes      DET    B    NO                                               
  559.  DumpFiles         DF     B    NO                                               
  560.  DumpFroms         DFR    B    NO                                               
  561.  DumpMisc          DM     B    NO                                               
  562.  DumpOpts          DO     B    NO                                               
  563.  DumpPhase2        DP2    B    NO                                               
  564.  DumpSectionTypes  DST    B    NO                                               
  565.  DumpSkipFroms     DSF    B    NO                                               
  566.  DumpSkipSubjects  DSS    B    NO                                               
  567.  DumpSubjects      DS     B    NO                                               
  568.                                                                                 
  569.  TrapAllBegs       TAB    B    NO                                               
  570.  TrapAllEncs       TAE    B    NO                                               
  571.  TrapAllSecs       TAS    B    NO                                               
  572.                                                                                 
  573. ------------------------------------------------------------------------------- 
  574.                                                                                 
  575.   Debug             - turns on ALL debugging options                            
  576.   DumpBase64Types   - writes the Base64TypesFile to the console/log             
  577.   DumpBinTypes      - writes the BinTypesFile to the console/log                
  578.   DumpDates         - writes ALL Date: header lines to the console/log          
  579.   DumpEncTypes      - writes the EncTypesFile to the console/log                
  580.   DumpFiles         - writes the Files. array to the console/log                
  581.   DumpFroms         - writes ALL From: header lines to the console/log          
  582.   DumpMisc          - writes the MiscInfo. array to the console/log             
  583.   DumpOpts          - writes all of the runtime options to the console/log      
  584.   DumpPhase2        - writes various arrays to the console/log                  
  585.   DumpSectionTypes  - writes the SectionTypesFile to the console/log            
  586.   DumpSkipFroms     - writes the SkipFromFile to the console/log                
  587.   DumpSkipSubjects  - writes the SkipSubjectsFile to the console/log            
  588.   DumpSubjects      - writes ALL Subject: header lines to the console/log       
  589.                                                                                 
  590.   TrapAllBegs       - writes ALL lines containing 'begin' to the console/log    
  591.   TrapAllEncs       - writes ALL 'Content-Transfer-Encoding:' lines             
  592.   TrapAllSecs       - writes ALL lines containing 'section' to console/log      
  593.                                                                                 
  594.                                                                                 
  595.  
  596.                                                                                 
  597. 5.10. Logging Options                                 
  598. ---------------------
  599.                                                                                 
  600.  Log               L      B    YES                                              
  601.  LogFile           LF     S    DWdecode.Log                                     
  602.                                                                                 
  603. ------------------------------------------------------------------------------- 
  604.                                                                                 
  605.   LOG=YES says to write reports to a file instead of the console                
  606.   LOGFILE is used to specify the name of the log file.                          
  607.                                                                                 
  608.                                                                                 
  609.  
  610.                                                                                 
  611. 5.11. Miscellaneous Runtime Options                          
  612. -----------------------------------
  613.                                                                                 
  614.  DWassignIN        DWI    S    DW:                                              
  615.  DWtemp            DWT    F    T:                                               
  616.  Quiet             Q      B    NO                                               
  617.  RunBack           RB     S    run > nil:                                       
  618.  ScanOnly          SO     B    NO                                               
  619.  ScanProg          SP     F    FlashFind                                        
  620.                                                                                 
  621. ------------------------------------------------------------------------------- 
  622.                                                                                 
  623.   DWassignIN - within the program I use this assign for the input directory.    
  624.                you would only need to change it if there was a conflict with    
  625.                an existing assign - it is removed at the end of program.        
  626.                                                                                 
  627.   DWtemp     - this is used as the target of temporary files. Might need to     
  628.                changed if T: can't handle the amount of bytes necessary?        
  629.                                                                                 
  630.   QUIET      - if set to YES will suppress almost all console messages. I       
  631.                recommend leaving it set to NO so that you have something to     
  632.                watch as the decode process progresses.                          
  633.                                                                                 
  634.                                                                                 
  635.   RunBack    - this runs QuickSort. You could change it to use c:asyncrun or    
  636.                some other program -- why I'm not really sure.                   
  637.                                                                                 
  638.   ScanOnly   - if set to YES will have the program do everything EXCEPT the     
  639.                actual decoding and deleting of files. If you are nervous about  
  640.                running this or just curious about the output - try this. It     
  641.                was mostly useful when I was doing the coding.                   
  642.                                                                                 
  643.   ScanProg   - originally I had intended allowing for different Scan/search     
  644.                programs, but the AmigaDos Search command was tooooo slow,       
  645.                and others wrote strange characters. FlashFind was fast AND it   
  646.                was easy to parse the output. So this option MUST be FlashFind   
  647.                with its path (if you put in a different directory)              
  648.                                                                                 
  649.                                                                                 
  650.                                                                                 
  651.  
  652.  
  653.  
  654.                                                                                 
  655. 5.12. Making DWDecode Smarter                                
  656. -----------------------------
  657.                                                                                 
  658.  TrapNewEncs       TNE    B    YES                                              
  659.  TrapNewEncsFile   TNEF   S    DWdecode.Trap.Encodes                            
  660.  TrapNewSecs       TNS    B    YES                                              
  661.  TrapNewSecsFile   TNSF   S    DWdecode.Trap.Sections                           
  662.                                                                                 
  663. ------------------------------------------------------------------------------- 
  664.                                                                                 
  665.   TrapNewEncs - enables trapping of NEW 'Content-Transfer-Encoding:' lines.     
  666.                 This enables you to add them as you discover them.              
  667.                                                                                 
  668.   TrapNewEncsFile is the file where the NEW encoding lines are logged.          
  669.                                                                                 
  670.   TrapNewSecs - enables trapping of NEW section lines. These are lines that     
  671.                 start with the word section and do not match ones in the STF    
  672.                                                                                 
  673.   TrapNewSecsFile is the file where the NEW section lines are logged            
  674.                                                                                 
  675.                                                                                 
  676.   SUGGESTION: Check these files occasionally and add the necessary info to     
  677.   the corresponding file. Also, I would appreciate it if you would send any     
  678.   new section lines or encoding lines to me (email) and I will add them for     
  679.   future updates.                                                               
  680.                                                                                 
  681.  
  682. 5.13. Summary List
  683. ------------------
  684.  
  685.   Command-Option   Alias  Internal Value
  686.   -----------------------------------------------------------------------------
  687.   B64cmdFail       BF     20
  688.   Base64Cmd        BC     Base64Decode %SF %DF USEMINLEN > nil:
  689.   Base64TypesFile  B64F   DWdecode.Base64.Types
  690.   BinCmdFail       BHF    20
  691.   BinHexCmd        BHC    BHD data=%DF %SF
  692.   BinTypesFile     BTF    DWdecode.Binary.Types
  693.   Debug            DB     NO
  694.   DeleteAfter      DELA   NO
  695.   DeleteDups       DELD   NO
  696.   DeleteFrom       DELF   NO
  697.   DeleteOld        DELO   NO
  698.   DeleteSubject    DELS   NO
  699.   DeleteText       DELT   NO
  700.   Dest             D      == none ==
  701.   DumpBase64Types  D64T   NO
  702.   DumpBinTypes     DBT    NO
  703.   DumpDates        DD     NO
  704.   DumpEncTypes     DET    NO
  705.   DumpFiles        DF     NO
  706.   DumpFroms        DFR    NO
  707.   DumpMisc         DM     NO
  708.   DumpOpts         DO     NO
  709.   DumpPhase2       DP2    NO
  710.   DumpSectionTypes DST    NO
  711.   DumpSkipFroms    DSF    NO
  712.   DumpSkipSubjects DSS    NO
  713.   DumpSubjects     DS     NO
  714.   DWassignIN       DWI    DW:
  715.   DWtemp           DWT    T:
  716.   EncTypesFile     ETF    DWdecode.Encode.Types
  717.   FileNote         FN     %LLQ2 : %SUBJECT
  718.   KeepDays         KD     30
  719.   Log              L      YES
  720.   LogFile          LF     DWdecode.Log
  721.   MarkOld          MO     YES
  722.   MaxHeader        MH     25
  723.   MinEncoded       ME     4
  724.   PrefsFile        P      DWdecode.Prefs
  725.   Quiet            Q      NO
  726.   Recursive        REC    YES
  727.   Replace          REP    NO
  728.   RunBack          RB     run > nil:
  729.   ScanOnly         SO     NO
  730.   ScanProg         SP     FlashFind
  731.   SectionTypesFile STF    DWdecode.Section.Types
  732.   ShowDecode       SHDE   YES
  733.   ShowDirs         SHDI   YES
  734.   ShowFiles        SHF    YES
  735.   ShowParts        SHP    YES
  736.   ShowStats        SHS    YES
  737.   SkipFrom         SF     YES
  738.   SkipFromFile     SFF    DWdecode.Skip.Froms
  739.   SkipSubject      SS     YES
  740.   SkipSubjectFile  SSF    DWdecode.Skip.Subjects
  741.   Source           S      == none ==
  742.   TrapAllBegs      TAB    NO
  743.   TrapAllEncs      TAE    NO
  744.   TrapAllSecs      TAS    NO
  745.   TrapNewEncs      TNE    YES
  746.   TrapNewEncsFile  TNEF   DWdecode.Trap.Encodes
  747.   TrapNewSecs      TNS    YES
  748.   TrapNewSecsFile  TNSF   DWdecode.Trap.Sections
  749.   UUcmd            UC     UUout %SF BUFSIZE=150 IGNORETERMINATION USEBASENAME > nil:
  750.   UUcmdFail        UF     10
  751.   XDELETE          XD     NO
  752.                                                                                
  753. 5.14. Index of Options
  754. ----------------------
  755.  
  756.   B64cmdFail         `Decoders and their Failure Codes'                                 
  757.   Base64Cmd          `Decoders and their Failure Codes'                               
  758.   Base64TypesFile    `Files used for Determining Decoding Information'
  759.   BincmdFail         `Decoders and their Failure Codes'               
  760.   BinHexCmd          `Decoders and their Failure Codes'               
  761.   BinTypesFile       `Files used for Determining Decoding Information'
  762.   Debug              `Debugging Options'                              
  763.   DeleteAfter        `Delete Options'                                 
  764.   DeleteDups         `Delete Options'                                 
  765.   DeleteFrom         `Delete Options'                                 
  766.   DeleteOld          `Delete Options'                                 
  767.   DeleteSubject      `Delete Options'                                 
  768.   DeleteText         `Delete Options'                                 
  769.   Dest               `Directories and Input and Output'               
  770.   DumpBase64Types    `Debugging Options'                              
  771.   DumpBinTypes       `Debugging Options'                              
  772.   DumpDates          `Debugging Options'                              
  773.   DumpEncTypes       `Debugging Options'                              
  774.   DumpFiles          `Debugging Options'                              
  775.   DumpFroms          `Debugging Options'                              
  776.   DumpMisc           `Debugging Options'                              
  777.   DumpOpts           `Debugging Options'                              
  778.   DumpOpts           `Report Control Options'                         
  779.   DumpPhase2         `Debugging Options'                              
  780.   DumpSectionTypes   `Debugging Options'                              
  781.   DumpSkipFroms      `Debugging Options'                              
  782.   DumpSkipSubjects   `Debugging Options'                              
  783.   DumpSubjects       `Debugging Options'                              
  784.   DWassignIN         `Miscellaneous Runtime Options'                  
  785.   DWtemp             `Miscellaneous Runtime Options'                  
  786.   EncTypesFile       `Files used for Determining Decoding Information'
  787.   FileNote           `Directories and Input and Output'               
  788.   KeepDays           `Filtering of Input Files'                       
  789.   Log                `Logging Options'                                
  790.   LogFile            `Logging Options'                                
  791.   MarkOld            `Filtering of Input Files'                       
  792.   MaxHeader          `Variables used for Determining Decoding Information'    
  793.   MinEncoded         `Variables used for Determining Decoding Information'    
  794.   PrefsFile          `Files used for Setting Runtime Options'         
  795.   Quiet              `Miscellaneous Runtime Options'                  
  796.   Recursive          `Directories and Input and Output'               
  797.   Replace            `Directories and Input and Output'               
  798.   RunBack            `Miscellaneous Runtime Options'                  
  799.   ScanOnly           `Miscellaneous Runtime Options'                  
  800.   ScanProg           `Miscellaneous Runtime Options'                  
  801.   SectionTypesFile   `Files used for Determining Decoding Information'
  802.   ShowDecode         `Report Control Options'
  803.   ShowDirs           `Report Control Options'                         
  804.   ShowFiles          `Report Control Options'                         
  805.   ShowParts          `Report Control Options'                         
  806.   ShowStats          `Report Control Options'                         
  807.   SkipFrom           `Filtering of Input Files'                       
  808.   SkipFromFile       `Filtering of Input Files'                       
  809.   SkipSubject        `Filtering of Input Files'                       
  810.   SkipSubjectFile    `Filtering of Input Files'                       
  811.   Source             `Directories and Input and Output'               
  812.   TrapAllBegs        `Debugging Options'                              
  813.   TrapAllEncs        `Debugging Options'                              
  814.   TrapAllSecs        `Debugging Options'                              
  815.   TrapNewEncs        `Making DWDecode Smarter'                        
  816.   TrapNewEncsFile    `Making DWDecode Smarter'                        
  817.   TrapNewSecs        `Making DWDecode Smarter'                        
  818.   TrapNewSecsFile    `Making DWDecode Smarter'                        
  819.   UUcmd              `Decoders and their Failure Codes'               
  820.   UUcmdFail          `Decoders and their Failure Codes'               
  821.   XDELETE            `Delete Options'                                 
  822.  
  823.  
  824.  
  825. 6. History 
  826. -----------
  827.  
  828.   v1.02 Fixes:        
  829.  
  830.       Finally, I HOPE, have fixed adding libraries during init. Several
  831.       people told me I hadn't... must have been some other program;)
  832.  
  833.   v1.01 Fixes:        
  834.  
  835.       Discovered that RexxTricks.Library uses the SAME function name as 
  836.          QuickSort, BUT in a different format. 
  837.          Added code to test if RexxTricks is present and to call QSORT 
  838.          in that format if necessary instead of W.L's. 
  839.          The SORTS are faster if RexxTricks.Library is NOT present,
  840.          so try to do decoding prior to anything that might add it.
  841.  
  842.       Can NOW place in directory named DWDECODE and have it WORK!! Really 
  843.          stupid error - thanks to Paul Copsey for finding this one.
  844.  
  845.       Now correctly deletes parts greater than 1 of multipart input files
  846.          when DeleteDups is specified. 
  847.  
  848.       If DWdecode MUST resort to using just Subject: line information will
  849.          now consider the SAME partname appearing multiple times in the 
  850.          subject, IFF it is the only name present, as THE name to use.
  851.  
  852.       Added support for BinHex files (only 1/1 type files). 
  853.          New variables w/defaults: 
  854.             BinHexCmd='BHD data=%DF %SF'
  855.             BinCmdFail=20
  856.  
  857.       Removed unused variable DumpB64Files from preferences/help.
  858.  
  859.       Now handles PC type lines with Ctrl-M's
  860.  
  861.       Now filenotes output files containing parens in their names
  862.  
  863.       Now writes FileNote errors to log/console as requested
  864.  
  865.       Made maximum filename length on report = 30 characters.          
  866.  
  867.       Added message referring user to logfile for errors.
  868.  
  869.       Added Guide format of 'documentation'.
  870.  
  871.  
  872.   v1.0  Initial Release
  873.  
  874.  
  875.  
  876. 7. Bugs 
  877. --------
  878.  
  879. As of the date of uploading this program, I have stopped being able to break
  880. it. This does not mean it is bug free. If you find any, please email me so
  881. that I can correct it for others. Also, when you find NEW Section lines or
  882. MIME encoding types, I would appreciate you emailing them on to me and I
  883. will add them to future updates, changes, etc. 
  884.  
  885. Thanks. 
  886.  
  887.  
  888. 8. Thanks
  889. ---------
  890.  
  891. Thank you's to:
  892.  
  893.   Willy Langeveld for RexxArpLib, VLT, QuickSort, et. al.
  894.  
  895.   Frank Würkner for FlashFind
  896.  
  897.   Nicolas Dade for UUout
  898.      
  899.   Edmund Vermeulen for Base64coders
  900.  
  901.   Nik Soggia for binhex374
  902.  
  903.   Stephan Sürken for Text2Guide 
  904.       (without it I would not have done a Guide format documentation)
  905.  
  906.   Marcel Beck for YAM - the BEST way to contact me
  907.  
  908.   Holger Kruse for MIAMI - the BEST way to hook YAM to the net;)
  909.  
  910.     AND ... 
  911.  
  912.   all of the other shareware, freeware, etc. programmers for the AMIGA
  913.   who make it possible for US to still use our favorite machine;)    
  914.  
  915.  
  916. Dick Whiting
  917. April 02, 1997
  918.